package view;

import com.dmapp.utils.Utils1;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.LinearGradient;
import android.graphics.Paint;
import android.graphics.Shader;
import android.util.AttributeSet;
import android.view.View;

public class LinearGradientView extends View{

	
	private LinearGradient lg;
	private Paint mPaint;
	private int width;
	
	public LinearGradientView(Context context, AttributeSet attrs) {
		super(context, attrs);
		// TODO Auto-generated constructor stub
		lg = new LinearGradient(10, 10, 100, 100, 
				Color.RED, Color.argb(0xFF, 0x99, 0x32, 0xcd)
				, Shader.TileMode.REPEAT
			//	,null
				);
		
		mPaint = new Paint();
		
		
		
	}
	
	
	@Override
	public void draw(Canvas canvas) {
		// TODO Auto-generated method stub
		super.draw(canvas);
		
		mPaint.setShader(lg);
		canvas.drawRect(10, 10, 100, 100, mPaint);
		
		
	}
	

}
